package edu.zut.hb.software.train.PaymentManager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.train.Payment.dao.PaymentDao;
import edu.zut.hb.software.train.Payment.domain.Payment;
import edu.zut.hb.software.train.PaymentManager.service.PaymentManager;




@Service("paymentManager")
public class PaymentManagerImpl extends GenericManagerImpl<Payment, Long> implements PaymentManager {

	
	PaymentDao paymentDao;
	
	@Autowired
	public void setPaymentDao(PaymentDao paymentDao) {
		this.paymentDao = paymentDao;
		this.dao = this.paymentDao;
	}

	@Override
	public List<Payment> getAll() {
		List<Payment> all = this.paymentDao.findAll();
		if (logger.isInfoEnabled()) {
			logger.info("getAll() - List<Payment> all={}", all); //$NON-NLS-1$
		}
		return all;
	}
 
}